package practice;

/**
 * Description:
 *
 * @Author cowen
 * @Create 2023/10/18 17:53
 * @Version 1.0
 */
class Degree{
    public static void main(String[] args) {
        int[][] degrees = new int[10][];
        for (int i = 0; i < degrees.length; i++) {
            degrees[i]=new int[i+1];
            degrees[i][0]=1;
            degrees[i][i]=1;
            for (int j = 1; j < degrees[i].length-1; j++) {
                degrees[i][j]=degrees[i-1][j]+degrees[i-1][j-1];
            }
        }
        for (int i = 0; i < degrees.length; i++) {
            for (int j = 0; j < degrees[i].length; j++) {
                System.out.print(degrees[i][j]+"\t");
            }
            System.out.println();
        }
    }
}
